Define diagram view

Overview

Profiles can define the structure of a model as a metamodel and the representation of the model as a view. The diagram view definition defines the following as a model representation format.

  • Entity shape (shape)
  • Relationship line between entities (connector)

Below, let's define a diagram view in which the [Use Case Model] can be edited in the use case diagram format of UML.

  1. Add a view to [Use Case Model] defined in the metamodel
  2. Add a shape for each [Actor] and [Use case] entity defined in the metamodel
  3. Added a connector for the reference relation between [Actor] and [Use case] defined in the metamodel.

Image of the diagram view to define

Diagram view definition of use case diagram


1. Add a view to the model

Switch to model edit screen

View definition is performed on the model edit screen used for modeling. First, select [Model Navigator] from the selector at the top of the navigator to switch to the model edit screen.

Switch to Model Navigator

Add use case model for view definition

To start view definition, you need to add one model for view definition in the model navigator. Follow the procedure below to add a use case model for which a view is defined.

Add Use Case Model

Operating procedure

  1. Right-click [Profile Definition Sample] displayed at the top of the model navigator, From the context menu, click Add Model> Request Model, Add [Requirement Model] directly under the project.
  2. Right-click on the added Request Model, From the context menu, click Add Model> Use Case Model, Add use case model of view definition target.
  3. This has added the Requirement Model> Use Case Model needed to start the view definition.

Add ER diagram view to use case model

To be able to edit the Use Case Model in Use Case Diagram format, Follow the steps below to add an ER diagram to the Use Case Model view.

Add ER Diagram View

Operating procedure

  1. In the Model Navigator, select Use Case Model.
  2. From the ribbon, click Profile> View Definition> Add View and click ER on the diagram The New Diagram dialog is displayed.
  3. Enter [Usecase Diagram] in the display name and click the [OK] button to add the view options to the upper right of the editor edit area.

2. Add shape for each entity

To be able to add models to the diagram view you just added, add a shape to the view and Assign the entities defined in the metamodel.

This section will walk you through adding the following shapes and assigning entities so you can add [Actor] and [Use case] to your view.

Shape Type Entity Figure
[With Label] Shape [Actor] UML/SysML Figure> Actor
[Title Only Shape] Shape [Use case] UML/SysML Shape> Use Case

Add Shape

Operating procedure

  1. From the ribbon, click Profile> Diagram> Shape and click the type of shape you want to add.
  2. Select the entity to assign in the Target Field of the New Shape dialog.
  3. Next, set the following items in the dialog.
    • Select the shape shape in [Style]-[Figure].
    • Select the field to be displayed in the shape and the type of [Character Alignment] in [Title] and [Body] of [Text].
  4. Click the [OK] button in the dialog to add the corresponding icon to the toolbox and add it to the view.

3. Add connector for reference relation between entities

In order to connect the model components on the ER diagram view with relation lines, add a connector to the view, Assign the associations defined in the metamodel.

Here, the relation line corresponding to the reference relation between [Actor] and [Use case] related in the metamodel is This section describes the procedure for connecting on the ER diagram view.

Add Connector

Operating procedure

  1. Add [Actor] and [Use case] on the ER diagram view.
  2. Hold down the Ctrl key and click to select [Actor] and [Use case].
  3. From the ribbon, click ▼ under Profile> Diagram> Connector> Connector and then click Add Connector Exist Reference.
  4. In the Relationship Class of the New Connector Shape dialog, select Actor to Use Case Reference as the relationship to assign, Click the [OK] button.
  5. With the addition of the connector, you can now associate those entities on the diagram.

Note

  • A connector must be defined for each association defined in the metamodel.